package com.tbb.app.base.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.tbb.app.base.entity.Message;
import com.tbb.app.base.search.MessageAdminPageSearch;
import com.tbb.app.base.search.MessagePageSearch;
import com.tbb.app.base.vo.MessageAdminVO;
import com.tbb.app.base.vo.MessageVO;

import java.io.IOException;

/**
 * 消息表 服务类
 *
 * @author Liu
 * @since 2022-01-11
 */
public interface IMessageService extends IService<Message> {

    /**
     * 消息分页查询
     *
     * @param search
     * @return
     */
    IPage<MessageVO> page(MessagePageSearch search);

    /**
     * 消息监控
     *
     * @param search
     * @return
     */
    IPage<MessageAdminVO> page(MessageAdminPageSearch search);

    /**
     * 点对点聊天
     *
     * @param vo
     */
    void sendMessage(MessageVO vo) throws IOException;
}
